package br.com.fogas.webservice.service.impl;

import android.content.Context;
import br.com.fogas.utils.exception.ParseXmlException;
import br.com.fogas.webservice.exception.ERaiseWebServiceException;
import br.com.fogas.webservice.exception.RespostaWebServiceException;
import br.com.fogas.webservice.exception.SemConexaoInternetException;
import br.com.fogas.webservice.exception.ServidorForaException;
import br.com.fogas.webservice.exception.TempoEsperaRespostaException;
import br.com.fogas.webservice.exception.WebServiceException;
import br.com.fogas.webservice.parser.material.MaterialRequest;
import br.com.fogas.webservice.parser.material.MaterialResponse;
import br.com.fogas.webservice.repository.IRepositoryHandler;
import br.com.fogas.webservice.repository.soap.MaterialRepository;
import br.com.fogas.webservice.service.IServiceHandler;

public class MaterialService implements IServiceHandler<MaterialResponse> {

	private IRepositoryHandler<MaterialResponse> repository;
	
	public MaterialService(Context context, MaterialRequest request) {
		this.repository = new MaterialRepository(context, request);
	}
	
	@Override
	public MaterialResponse getResponse() throws SemConexaoInternetException,
			ParseXmlException, TempoEsperaRespostaException,
			ServidorForaException, RespostaWebServiceException,
			WebServiceException, ERaiseWebServiceException {
		return repository.getResponse();
	}

}
